namespace MESTranslateToPLC.Core.InitConfig;

public static class HttpConfig
{
    public static IServiceCollection ConfigureHttpServices(this IServiceCollection services,
        IConfiguration configuration)
    {
        services.AddHttpClient("test", (sp, client) =>
        {
            client.BaseAddress = new Uri("http://127.0.0.1:8000/");
            // 请求头
            // client.DefaultRequestHeaders.Add(HeaderNames.Accept, "application/json");
        });
        // services.AddHttpClient("common");
        return services;
    }
}